# -*- encoding: utf-8 -*-
'''
@File    :   urls.py    
@Create Time : 2022/1/17 10:09     
@Author :ygy    
'''
#有视图
# from django.conf.urls import url
# from . import views
#
# urlpatterns = [
#     # ex : /poll/
#     url(r'^$', views.index, name='index'),
#     # ex : /poll/1/
#     url(r'^(?P<question_id>[0-9]+)/$', views.detail, name='detail'),
#     # ex : /poll/1/results/
#     url(r'^(?P<question_id>[0-9]+)/results/$', views.results, name='results'),
#     # ex : /poll/1/vote
#     url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, name='vote'),
# ]

#无视图
from django.conf.urls import url
from . import views_1

urlpatterns = [
    # ex : /poll/
    url(r'^$', views_1.index, name='index'),
    # ex : /poll/1/
    url(r'^(?P<question_id>[0-9]+)/$', views_1.detail, name='detail'),
    # ex : /poll/1/results/
    url(r'^(?P<question_id>[0-9]+)/results/$', views_1.results, name='results'),
    # ex : /poll/1/vote
    url(r'^(?P<question_id>[0-9]+)/vote/(?P<option_id>\d+)/$', views_1.vote, name='vote'),
]
